<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <link rel="shortcut icon" href="img/logo.png">
    <link href="css/swiper.css" rel="stylesheet" type="text/css"/>
    <title>Title</title>
    <style>
        * {
            moz-user-select: -moz-none;
            -moz-user-select: none;
            -o-user-select: none;
            -khtml-user-select: none;
            -webkit-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        .swiper-container {
            width: 600px;
            height: 300px;
        }
        .swiper-slide{
            border:1px solid red;
        }
    </style>
</head>
<body>
<div class="swiper-container">
    <div class="swiper-wrapper">
        <div class="swiper-slide blue-slide">
            slider1</div>
        <div class="swiper-slide blue-slide">
            slider2</div>
    </div>
    <div class="swiper-pagination"></div>
    <div class="swiper-button-prev"></div>
    <div class="swiper-button-next"></div>
    <div class="swiper-scrollbar"></div>
</div>
</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/swiper.min.js"></script>
<script>
    $(function(){

        var cont=$('.swiper-wrapper').children().length
        if(cont>1){
            var mySwiper = new Swiper('.swiper-container',{
                loop:true,
                autoplay : true,
            })
        }else{
            var mySwiper = new Swiper('.swiper-container',{

                watchOverflow: true,
                autoplay : true,

                navigation: {
                    nextEl: '.swiper-button-next',
                    prevEl: '.swiper-button-prev',
                },
                pagination: {
                    el: '.swiper-pagination',
                },
                scrollbar: {
                    el: '.swiper-scrollbar',
                },
            })
        }
    })

</script>

</html>